package org.qcit.plugins

import com.android.build.gradle.AppExtension
import com.android.build.gradle.AppPlugin
import com.android.build.gradle.api.ApplicationVariant
import org.gradle.api.*
import org.gradle.internal.execution.history.AfterExecutionState

class TimeCountPlugin implements Plugin<Project> {
    @Override
    public void apply(Project project) {
        if (!project.getPlugins().hasPlugin(AppPlugin.class)){
            throw new GradleException("无法在非android application插件中使用插件");
        }
        System.out.println("=================开始了===================")
        project.extensions.create("PackagePatch",PackageExtension)
        project.android.registerTransform(new TimeCountTransForm(project))//页面参数传递 绑定界面
    }
}